package com.neuedu.shop.service.impl;

import com.neuedu.shop.entity.Admin;
import com.neuedu.shop.mapper.AdminMapper;
import com.neuedu.shop.service.AdminService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author BL
 * @since 2021-04-10
 */
@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements AdminService {
    @Resource
    private AdminMapper mapper;

    @Override
    public void insertAdmin(Admin admin) {
        mapper.insertAdmin(admin);
    }

    @Override
    public void updateAdmin(Admin admin) {
        mapper.updateAdmin(admin);
    }

    @Override
    public Admin login(String adminName) {
        return mapper.findByAdminName(adminName);
    }


}
